<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<link href="/css/layui.css" rel="stylesheet">
<style>
    .layui-upload-file{
        visibility: hidden;
    }
    #pic{
        width:140px;
        height:140px;
    }
</style>
<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <form class="form-horizontal m-t" id="signupForm">
                        <input id="id" name="id" th:value="${instock.id}" type="hidden">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">商品编号：</label>
                            <div class="col-sm-8">
                                <input id="skuId" name="skuId" th:value="${instock.skuId}" class="form-control"
                                       type="hidden">
                                <input id="sku" name="sku" th:value="${instock.sku}" class="form-control" type="text"
                                       readonly>
                            </div>
                        </div>
                        <!--<div class="form-group">
                            <label class="col-sm-3 control-label">商品图片：</label>
                            <div class="col-sm-8">
                                <input id="picurl" name="picurl" th:value="${instock.picurl}" class="form-control" type="text">
                            </div>
                        </div>-->
                        <div class="form-group">
                            <label class="col-sm-3 control-label">商品名称：</label>
                            <div class="col-sm-8">
                                <input id="proName" name="proName" th:value="${instock.proName}" class="form-control"
                                       type="text" readonly>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">商品型号：</label>
                            <div class="col-sm-8">
                                <input id="proModel" name="proModel" th:value="${instock.proModel}" class="form-control"
                                       type="text" readonly>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">产品规格：</label>
                            <div class="col-sm-8">
                                <input id="proSpec" name="proSpec" th:value="${instock.proSpec}" class="form-control"
                                       type="text" readonly>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">产品品牌：</label>
                            <div class="col-sm-8">
                                <input id="proBrand" name="proBrand" th:value="${instock.proBrand}" class="form-control"
                                       type="text" readonly>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">产地：</label>
                            <div class="col-sm-8">
                                <input id="picOrigin" name="picOrigin" th:value="${instock.picOrigin}"
                                       class="form-control" type="text" readonly>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">入库数量：</label>
                            <div class="col-sm-8">
                                <input id="inqty" name="inqty" th:value="${instock.inqty}" class="form-control"
                                       type="text" oninput="inStockQty()">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">采购单价：</label>
                            <div class="col-sm-8">
                                <input id="purPrice" name="purPrice" th:value="${instock.purPrice}" class="form-control"
                                       type="text" oninput="inStockQty()">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">税率：</label>
                            <div class="col-sm-8">
                                <input id="taxRate" name="taxRate" th:value="${instock.taxRate}" class="form-control"
                                       type="text" oninput="inStockQty()">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">不含税价：</label>
                            <div class="col-sm-8">
                                <input id="noTaxPrice" name="noTaxPrice" th:value="${instock.noTaxPrice}"
                                       class="form-control" type="text" readonly>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">总价：</label>
                            <div class="col-sm-8">
                                <input id="allPrice" name="allPrice" th:value="${instock.allPrice}" class="form-control"
                                       type="text" readonly>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">采购合同编号：</label>
                            <div class="col-sm-8">
                                <input id="purGropupId" name="purGropupId" class="form-control"  th:value="${instock.purGropupId}" type="hidden">
                                <select data-placeholder="采购合同编号" name="groupid" class="form-control chosen-select-groupid" tabindex="2" required>
                                    <option value="">采购合同编号</option>
                                    <option th:each="groupDO : ${groupDOList}" th:value="${groupDO.id}" th:text="${groupDO.groupid}"
                                            th:selected="${groupDO.id} == ${instock.purGropupId}"></option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">供应商：</label>
                            <div class="col-sm-8">
                                <input id="supplierId" name="supplierId" th:value="${instock.supplierId}"
                                       class="form-control" type="hidden">
                                <input id="supplierName" name="supplierName" th:value="${instock.supplierName}"
                                       class="form-control" type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">仓库：</label>
                            <div class="col-sm-8">
                                <select data-placeholder="仓库" name="warehouseId" class="form-control chosen-select-warehouseId" tabindex="2" required>
                                    <option value="">仓库</option>
                                    <option th:each="warehouseDO : ${warehouseDOList}" th:value="${warehouseDO.id}" th:text="${warehouseDO.name}"
                                            th:selected="${warehouseDO.id} == ${instock.warehouseId}"></option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">入库凭证：</label>
                            <div class="col-sm-8">
                                <input id="inqtyUrl" name="inqtyUrl" th:value="${instock.inqtyUrl}" class="form-control"
                                       type="hidden">
                                <button type="button" id="upLoad" class="layui-btn"><i class="fa fa-cloud"></i>上传文件
                                </button>
                                <img src="" id="pic" th:src="${instock.inqtyUrl}" style="width: 120px;height: 100px;">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-8 col-sm-offset-3">
                                <button type="submit" class="btn btn-primary">提交</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<div th:include="include::footer"></div>
<script src="/js/layui.js"></script>
<script type="text/javascript" src="/js/appjs/pro/instock/edit.js"></script>
<script type="text/javascript" src="/js/plugins/cropper/cropper.min.js"></script>
<script type="text/javascript" src="/js/plugins/layer/laydate/laydate.js" ></script>
<script type="text/javascript" src="/js/plugins/distpicker/distpicker.data.min.js"></script>
<script type="text/javascript" src="/js/plugins/distpicker/distpicker.min.js"></script>
</body>
</html>
